package com.uls.hdh.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.uls.hdh.mapper.HdhUsersMapper;
import com.uls.hdh.domain.HdhUsers;
import com.uls.hdh.service.IHdhUsersService;

/**
 * 用户Service业务层处理
 * 
 * @author hdh
 * @date 2024-11-11
 */
@Service
public class HdhUsersServiceImpl implements IHdhUsersService 
{
    @Autowired
    private HdhUsersMapper hdhUsersMapper;

    /**
     * 查询用户
     * 
     * @param usersId 用户主键
     * @return 用户
     */
    @Override
    public HdhUsers selectHdhUsersByUsersId(Long usersId)
    {
        return hdhUsersMapper.selectHdhUsersByUsersId(usersId);
    }


    public Long getUserIdByUsernumber(Long usernumber)
    {
        return hdhUsersMapper.getUserIdByUsernumber(usernumber);
    }

    /**
     * 查询用户列表
     * 
     * @param hdhUsers 用户
     * @return 用户
     */
    @Override
    public List<HdhUsers> selectHdhUsersList(HdhUsers hdhUsers)
    {
        return hdhUsersMapper.selectHdhUsersList(hdhUsers);
    }

    /**
     * 新增用户
     * 
     * @param hdhUsers 用户
     * @return 结果
     */
    @Override
    public int insertHdhUsers(HdhUsers hdhUsers)
    {
        return hdhUsersMapper.insertHdhUsers(hdhUsers);
    }

    /**
     * 修改用户
     * 
     * @param hdhUsers 用户
     * @return 结果
     */
    @Override
    public int updateHdhUsers(HdhUsers hdhUsers)
    {
        return hdhUsersMapper.updateHdhUsers(hdhUsers);
    }

    /**
     * 批量删除用户
     * 
     * @param usersIds 需要删除的用户主键
     * @return 结果
     */
    @Override
    public int deleteHdhUsersByUsersIds(Long[] usersIds)
    {
        return hdhUsersMapper.deleteHdhUsersByUsersIds(usersIds);
    }

    /**
     * 删除用户信息
     * 
     * @param usersId 用户主键
     * @return 结果
     */
    @Override
    public int deleteHdhUsersByUsersId(Long usersId)
    {
        return hdhUsersMapper.deleteHdhUsersByUsersId(usersId);
    }
}
